package com.qf.business.search.application;

import com.qf.business.search.service.ISearchService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * author Ken
 * create_time 2022/11/30
 */
@Component
@Slf4j
public class ApplicationRunning implements CommandLineRunner {
    @Autowired
    private ISearchService searchService;

    @Override
    public void run(String... args) throws Exception {
        log.debug("[app run] 搜索服务已经启动！！！");
        searchService.createIndex();
    }
}
